From c5a6b9776b4387d14ae068d9a269f2c8518076dc Mon Sep 17 00:00:00 2001 From: David Vrabel Date: Thu, 5 Jan 2012 15:47:16 +0000 Subject: [PATCH] x86: emulate lea with two register operands correctly An lea instruction with two register operands should raise an undefined instruction exception. Skype does such a instruction and will crash when starting if it does not get the exception. Signed-off-by: David Vrabel Signed-off-by: Keir Fraser Committed-by: Keir Fraser --- xen/arch/x86/x86_emulate/x86_emulate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index c7489276a8..acefad30b1 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -2240,6 +2240,7 @@ x86_emulate( } case 0x8d: /* lea */ + generate_exception_if(ea.type != OP_MEM, EXC_UD, -1); dst.val = ea.mem.off; break; -- 2.30.2